<template>
  <div class="current">
    <div class="w990np">
      <Breadcrumb class="current-bar">
        <BreadcrumbItem to="/">
          <Icon type="ios-home-outline"></Icon>
          Home
        </BreadcrumbItem>

        <BreadcrumbItem to="/components/breadcrumb" v-for="(item, index) in current" :key="item.id">
          <Icon type="social-buffer-outline"></Icon>
          {{ item }}
        </BreadcrumbItem>
      </Breadcrumb>
    </div>
  </div>
</template>

<script type="text/ecmascript-6">
  export default {
    data() {
      return {
        current: []
      }
    },
    mounted() {
      this.current = this.$route.path.substr(1).split('/')
    },
    created() {
      console.log(this.current);
    },
    methods: {
      autoCurrent () {

      }
    }
  }
</script>

<style scoped lang="stylus" rel="stylesheet/stylus">
  .current
    padding: 10px 0
</style>